package com.study.design.template.hook;

public class ConcreteClass1 extends AbstractClass {
    private boolean flag = true;

    @Override
    protected void doSomething() {
        //实现基本方法，进行业务处理
        System.out.println("ConcreteClass1-doSomething");
    }

    @Override
    protected void doAnything() {
        //实现基本方法，进行业务处理
        System.out.println("ConcreteClass1-doAnything");
    }

    @Override
    protected boolean flag() {
        return this.flag;
    }

    public void setFlag(boolean flag) {
        //客户端决定
        this.flag = flag;
    }
}
